<?php
namespace app\middleware;

use Webman\MiddlewareInterface;
use Webman\Http\Response;
use Webman\Http\Request;

class User implements MiddlewareInterface
{
    public function process(Request $request, callable $handler) : Response
    {

        $controller = $request->controller;
        $action = $request->action;
        $app = $request->app;

        if ($controller != 'app\user\controller\PublicController') {

            //验证用户是否登录
            
        }

        return $handler($request);
    }
    
}
